package com.alcatel_lucent.osp.service;

import com.alcatel_lucent.osp.model.User;

import java.util.Collection;
import java.util.List;

public interface LDAPService {

    /**
     * Validate username/password
     *
     * @param username
     * @param password
     * @return
     */
    boolean login(String username, String password);

    /**
     * Find users whose cil like cil or csl equals cil
     * or all the cil name parts with optional order
     * For example, a guy whose csl is: jimw and cil is Jim WANG
     * you can fell free to input jimw, Jim WANG and WANG Jim to find him(case insensitive).
     *
     * @param cil cil or csl or cil with any order
     * @return users whom matched
     */
    List<User> findUserByCILParts(String cil);

    User findUserByCSLOrCIL(String cslOrCil);
}
